The invention relates to the field of encapsulating nanomaterials and, in particular, to the encapsulation of semiconducting nanowires and carbon-encapsulated semiconducting nanowires.